<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" >

<%@ include file="../base/taglibs.jsp" %>
<%@page import="java.io.ByteArrayOutputStream"%>
<%@page import="java.io.DataOutputStream"%>
<%@page import="java.io.DataOutput"%>
<%@ page session="true"%>

<html>
	<%@ include file="../base/head.jsp" %>

	<body onload="setFocus();">
		<div id="wrap">
			<%@ include file="../snipped/header.jsp"%>
			
			<div id="content">
<%
    ByteArrayOutputStream buffer = (ByteArrayOutputStream)request.getAttribute("pdf");

	if(buffer!= null){
		out.clear();
		out = pageContext.pushBody();
		response.setContentType("application/pdf");
		DataOutput output = new DataOutputStream( response.getOutputStream() );
		byte[] bytes = buffer.toByteArray();
		response.setContentLength(bytes.length);
		output.write( bytes ); 
	}
%>
			</div>
			
			<br />
			<%@ include file="../snipped/footer.jsp"%>
		</div>
	</body>
	
</html>